import { LibAppView, createContextApi } from "../lib";
import i18nData from "../i18n";
import ApplicationPages from "./pages";
import { ServiceConfig } from "./service";

interface IRootContextApi {
    setTheme: (theme: "dark"|"light") => void;
}

export const RootApplication = LibAppView.createRootApp({
    i18n: i18nData,
    microApp: [],
    pages: ApplicationPages,
    ServiceProvider: ServiceConfig,
    entry: {
        default: "admin.main",
        pages: ["admin.main", "home.slash"]
    }
});

export const RootContextApi = createContextApi<IRootContextApi>({});
